<?php defined('IN_YUNYECMS') or exit('No permission.'); ?><link rel="stylesheet" href="<?php echo ADDONS_TPL;?>static/<?php echo $onlinecfg["theme"] ;?>/css/style.css">
<div class="suspension">
	<div class="suspension-box">
		<a href="#" class="a a-service "><i class="i"></i></a>
		<a href="javascript:;" class="a a-service-phone "><i class="i"></i></a>
		<a href="javascript:;" class="a a-qrcode"><i class="i"></i></a>
		<a href="javascript:;" class="a a-top"><i class="i"></i></a>
		<?php if(is_array($cat)): $i = -1; $__DATA__ = $cat;if(count($__DATA__)==0 )  echo "" ;foreach($__DATA__ as $key=>$vc): $mod = ($i % 2 );++$i;?>
	    <?php if($vc['index']=="qq") { ?>
		<div class="d d-service">
			<i class="arrow"></i>
			<div class="inner-box">
				<div class="d-service-item clearfix">
					 <?php if(is_array($vc['list'])): $i = -1; $__DATA__ = $vc['list'];if(count($__DATA__)==0 )  echo "" ;foreach($__DATA__ as $key=>$v): $mod = ($i % 2 );++$i;?>
					<a href="http://wpa.qq.com/msgrd?v=3&amp;uin=<?php echo $v["num"] ;?>&amp;site=qq&amp;menu=yes" class="clearfix"><span class="circle"><i class="i-qq"></i></span><h3><?php echo $v["title"] ;?></h3></a>
					 <?php  endforeach;  endif; ?>
				</div>
			</div>
		</div>
	    <?php } elseif ($vc['index']=="phone") { ?>
			<div class="d d-service-phone">
			<i class="arrow"></i>
			<div class="inner-box">
				<div class="d-service-item clearfix">
					<span class="circle"><i class="i-tel"></i></span>
					<div class="text">
						<?php if(is_array($vc['list'])): $n = -1; $__DATA__ = $vc['list'];if(count($__DATA__)==0 )  echo "" ;foreach($__DATA__ as $key=>$v): $mod = ($n % 2 );++$n;?>
						<p><?php echo $v["title"] ;?></p>
						<p class="red number"><?php echo $v["num"] ;?></p>
		                <?php  endforeach;  endif; ?>
						
					</div>
				</div>
			</div>
		</div>
        <?php } elseif ($vc['index']=="weixin") { ?>
		<div class="d d-qrcode">
			<i class="arrow"></i>
			 <?php if($vc['list']) { ?>
		    <?php if(is_array($vc['list'])): $n = -1; $__DATA__ = $vc['list'];if(count($__DATA__)==0 )  echo "" ;foreach($__DATA__ as $key=>$v): $mod = ($n % 2 );++$n;?>
			<div class="inner-box">
				<div class="qrcode-img"><img src="<?php echo $v["pic"] ;?>" alt=""></div>
				<p>WeChat</p>
			</div>
			  <?php  endforeach;  endif; ?>
			<?php } else { ?>
				<div class="inner-box">
				<div class="qrcode-img"><img src="<?php echo $lang["qrcode"] ;?>" alt=""></div>
				<p>WeChat</p>
			</div>
			<?php } ?>
		</div>
	    <?php } ?>
	<?php  endforeach;  endif; ?>
		

		
		


	</div>
</div>

<script type="text/javascript" src="<?php echo ADDONS_TPL;?>static/<?php echo $onlinecfg["theme"] ;?>/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){

	/* ----- 侧边悬浮 ---- */
	$(document).on("mouseenter", ".suspension .a", function(){
		var _this = $(this);
		var s = $(".suspension");
		var isService = _this.hasClass("a-service");
		var isServicePhone = _this.hasClass("a-service-phone");
		var isQrcode = _this.hasClass("a-qrcode");
		if(isService){ s.find(".d-service").show().siblings(".d").hide();}
		if(isServicePhone){ s.find(".d-service-phone").show().siblings(".d").hide();}
		if(isQrcode){ s.find(".d-qrcode").show().siblings(".d").hide();}
	});
	$(document).on("mouseleave", ".suspension, .suspension .a-top", function(){
		$(".suspension").find(".d").hide();
	});
	$(document).on("mouseenter", ".suspension .a-top", function(){
		$(".suspension").find(".d").hide(); 
	});
	$(document).on("click", ".suspension .a-top", function(){
		$("html,body").animate({scrollTop: 0});
	});
	$(window).scroll(function(){
		var st = $(document).scrollTop();
		var $top = $(".suspension .a-top");
		if(st > 400){
			$top.css({display: 'block'});
		}else{
			if ($top.is(":visible")) {
				$top.hide();
			}
		}
	});
	
});	
</script>